package com.dq.repository.user.centre;

import com.dq.domain.org.Org;
import com.dq.domain.sys.user.user.WxUser;
import com.dq.domain.sys.user.user.centre.UserCard;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author cf
 */
@Repository
public interface UserCardRepository extends JpaRepository<UserCard, Long> {
    List<UserCard> findByDeletedFalseAndWxUser(WxUser wxUser);
    List<UserCard> findByDeletedFalseAndWxUserAndOrgId(WxUser wxUser, Long orgId);

    UserCard findByDeletedFalseAndOrgIdAndWxUserIdAndCardType(Long orgId,Long wxUserId,UserCard.CardType type);
}
